home *** CD-ROM | disk | FTP | other *** search
- DEFINT A-Z
- DECLARE FUNCTION GetMonitor% ()
-
- PRINT GetMonitor
-
- '----------------------------------------------------------------------------
- ' Name: GetMonitor
- ' Purpose: This routine returns the type of monitor
- ' connected to a PC.
- ' 0 ---- Not EGA/VGA compatible
- ' 1 ---- Color monitor
- ' 2 ---- Monochrome monitor
- '----------------------------------------------------------------------------
- FUNCTION GetMonitor
- DEF SEG = &HC000
- IF (PEEK(0) = &H55) AND (PEEK(1) = &HAA) THEN
- ' Found expansion ROM signature - now test for Color/Mono
-
- DEF SEG = 0
- IF (PEEK(&H489) AND 4) <> 0 THEN
- GetMonitor = 2
- ELSE
- GetMonitor = 1
- END IF
- ELSE
- GetMonitor = 0
- END IF
- DEF SEG
- END FUNCTION
-
-